<template>
  <div>
    <el-checkbox-group v-model="model.bloodList" @change="handlerCheckBox">
      <el-checkbox label="1">A型</el-checkbox>
      <el-checkbox label="2">B型</el-checkbox>
      <el-checkbox label="3">O型</el-checkbox>
      <el-checkbox label="4">AB型</el-checkbox>
      <el-checkbox label="5">不详/RH:</el-checkbox>
    </el-checkbox-group>
    <el-checkbox-group
      v-model="model.bloodOtherList"
      @change="handlerOtherCheckBox"
    >
      <el-checkbox label="1">阴性</el-checkbox>
      <el-checkbox label="2">阳性</el-checkbox>
      <el-checkbox label="3">不详</el-checkbox>
    </el-checkbox-group>
  </div>
</template>

<script>
export default {
  props: {
    model: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {}
  },
  methods: {
    handlerCheckBox(value) {
      if (this.model.bloodList.length > 1) {
        this.model.bloodList.splice(0, 1)
      }
    },
    handlerOtherCheckBox() {
      if (this.model.bloodOtherList.length > 1) {
        this.model.bloodOtherList.splice(0, 1)
      }
    }
  }
}
</script>
<style lang="scss" scoped></style>
